package cn.gwm.flink.streaming.constant;

import com.alibaba.fastjson.JSONObject;

import java.math.BigDecimal;

/**
 * @author : GW00280745
 * @date : 2023/1/15 16:08
 * @description :
 */
public class DcBatterMapVal {
    public JSONObject load(){
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("soc(0,5]&temp<-20&vmin[1.8,2.4)",new BigDecimal(0.00));
        jsonObject.put("soc(0,5]&temp[-20,-15)&vmin[1.8,2.4)",new BigDecimal(0.05));
        jsonObject.put("soc(0,5]&temp[-15,-10)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[-10,-5)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[-5,0)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[0,5)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[5,10)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[10,15)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[15,20)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[20,25)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[25,30)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[30,35)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[35,40)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[40,45)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[45,50)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[50,55)&vmin[1.8,2.4)",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp<-20&vmin>>2.4",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[-20,-15)&vmin>>2.4",new BigDecimal("0.10"));
        jsonObject.put("soc(0,5]&temp[-15,-10)&vmin>>2.4",new BigDecimal("0.20"));
        jsonObject.put("soc(0,5]&temp[-10,-5)&vmin>>2.4",new BigDecimal("0.23"));
        jsonObject.put("soc(0,5]&temp[-5,0)&vmin>>2.4",new BigDecimal("0.33"));
        jsonObject.put("soc(0,5]&temp[0,5)&vmin>>2.4",new BigDecimal("0.57"));
        jsonObject.put("soc(0,5]&temp[5,10)&vmin>>2.4",new BigDecimal("0.74"));
        extracted1(jsonObject);
        extracted2(jsonObject);
        extracted3(jsonObject);
        jsonObject.put("soc(90,95]&temp[-5,0)",new BigDecimal("0.04"));
        jsonObject.put("soc(90,95]&temp[0,5)",new BigDecimal("0.06"));
        jsonObject.put("soc(90,95]&temp[5,10)",new BigDecimal("0.08"));
        jsonObject.put("soc(90,95]&temp[10,15)",new BigDecimal("0.10"));
        jsonObject.put("soc(90,95]&temp[15,20)",new BigDecimal("0.16"));
        jsonObject.put("soc(90,95]&temp[20,25)",new BigDecimal("0.20"));
        jsonObject.put("soc(90,95]&temp[25,30)",new BigDecimal("0.33"));
        jsonObject.put("soc(90,95]&temp[30,35)",new BigDecimal("0.33"));
        jsonObject.put("soc(90,95]&temp[35,40)",new BigDecimal("0.33"));
        jsonObject.put("soc(90,95]&temp[40,45)",new BigDecimal("0.33"));
        jsonObject.put("soc(90,95]&temp[45,50)",new BigDecimal("0.30"));
        jsonObject.put("soc(90,95]&temp[50,55)",new BigDecimal("0.30"));
        jsonObject.put("soc(95,100]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(95,100]&temp[-20,-15)&vmax[3.60,3.65]",new BigDecimal("0.02"));
        jsonObject.put("soc(95,100]&temp[-15,-10)&vmax[3.60,3.65]",new BigDecimal("0.02"));
        jsonObject.put("soc(95,100]&temp[-10,-5)&vmax[3.58,3.65]",new BigDecimal("0.02"));
        jsonObject.put("soc(95,100]&temp[-5,0)&vmax[3.58,3.65]",new BigDecimal("0.03"));
        jsonObject.put("soc(95,100]&temp[0,5)&vmax[3.55,3.65]",new BigDecimal("0.04"));
        jsonObject.put("soc(95,100]&temp[5,10)&vmax[3.52,3.65]",new BigDecimal("0.05"));
        jsonObject.put("soc(95,100]&temp[10,15)&vmax[3.52,3.65]",new BigDecimal("0.06"));
        jsonObject.put("soc(95,100]&temp[15,20)&vmax[3.52,3.65]",new BigDecimal("0.08"));
        jsonObject.put("soc(95,100]&temp[20,25)&vmax[3.52,3.65]",new BigDecimal("0.10"));
        jsonObject.put("soc(95,100]&temp[25,55)&vmax[3.52,3.65]",new BigDecimal("0.13"));
        return jsonObject;
    }

    private void extracted3(JSONObject jsonObject) {
        jsonObject.put("soc(50,60]&temp[-5,0)",new BigDecimal("0.15"));
        jsonObject.put("soc(50,60]&temp[0,5)",new BigDecimal("0.27"));
        jsonObject.put("soc(50,60]&temp[5,10)",new BigDecimal("0.41"));
        jsonObject.put("soc(50,60]&temp[10,15)",new BigDecimal("0.54"));
        jsonObject.put("soc(50,60]&temp[15,20)",new BigDecimal("0.70"));
        jsonObject.put("soc(50,60]&temp[20,25)",new BigDecimal("0.75"));
        jsonObject.put("soc(50,60]&temp[25,30)",new BigDecimal("1.05"));
        jsonObject.put("soc(50,60]&temp[30,35)",new BigDecimal("1.05"));
        jsonObject.put("soc(50,60]&temp[35,40)",new BigDecimal("1.05"));
        jsonObject.put("soc(50,60]&temp[40,45)",new BigDecimal("1.05"));
        jsonObject.put("soc(50,60]&temp[45,50)",new BigDecimal("0.80"));
        jsonObject.put("soc(50,60]&temp[50,55)",new BigDecimal("0.40"));
        jsonObject.put("soc(60,70]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(60,70]&temp[-20,-15)",new BigDecimal("0.03"));
        jsonObject.put("soc(60,70]&temp[-15,-10)",new BigDecimal("0.04"));
        jsonObject.put("soc(60,70]&temp[-10,-5)",new BigDecimal("0.07"));
        jsonObject.put("soc(60,70]&temp[-5,0)",new BigDecimal("0.12"));
        jsonObject.put("soc(60,70]&temp[0,5)",new BigDecimal("0.20"));
        jsonObject.put("soc(60,70]&temp[5,10)",new BigDecimal("0.29"));
        jsonObject.put("soc(60,70]&temp[10,15)",new BigDecimal("0.40"));
        jsonObject.put("soc(60,70]&temp[15,20)",new BigDecimal("0.46"));
        jsonObject.put("soc(60,70]&temp[20,25)",new BigDecimal("0.50"));
        jsonObject.put("soc(60,70]&temp[25,30)",new BigDecimal("0.80"));
        jsonObject.put("soc(60,70]&temp[30,35)",new BigDecimal("0.80"));
        jsonObject.put("soc(60,70]&temp[35,40)",new BigDecimal("0.80"));
        jsonObject.put("soc(60,70]&temp[40,45)",new BigDecimal("0.80"));
        jsonObject.put("soc(60,70]&temp[45,50)",new BigDecimal("0.60"));
        jsonObject.put("soc(60,70]&temp[50,55)",new BigDecimal("0.30"));
        jsonObject.put("soc(70,80]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(70,80]&temp[-20,-15)",new BigDecimal("0.02"));
        jsonObject.put("soc(70,80]&temp[-15,-10)",new BigDecimal("0.02"));
        jsonObject.put("soc(70,80]&temp[-10,-5)",new BigDecimal("0.04"));
        extracted4(jsonObject);
        jsonObject.put("soc(85,90]&temp[5,10)",new BigDecimal("0.11"));
        jsonObject.put("soc(85,90]&temp[10,15)",new BigDecimal("0.16"));
        jsonObject.put("soc(85,90]&temp[15,20)",new BigDecimal("0.24"));
        jsonObject.put("soc(85,90]&temp[20,25)",new BigDecimal("0.28"));
        jsonObject.put("soc(85,90]&temp[25,30)",new BigDecimal("0.50"));
        jsonObject.put("soc(85,90]&temp[30,35)",new BigDecimal("0.50"));
        jsonObject.put("soc(85,90]&temp[35,40)",new BigDecimal("0.50"));
        jsonObject.put("soc(85,90]&temp[40,45)",new BigDecimal("0.50"));
        jsonObject.put("soc(85,90]&temp[45,50)",new BigDecimal("0.40"));
        jsonObject.put("soc(85,90]&temp[50,55)",new BigDecimal("0.30"));
        jsonObject.put("soc(90,95]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(90,95]&temp[-20,-15)",new BigDecimal("0.02"));
        jsonObject.put("soc(90,95]&temp[-15,-10)",new BigDecimal("0.02"));
        jsonObject.put("soc(90,95]&temp[-10,-5)",new BigDecimal("0.02"));
    }

    private void extracted4(JSONObject jsonObject) {
        jsonObject.put("soc(70,80]&temp[-5,0)",new BigDecimal("0.10"));
        jsonObject.put("soc(70,80]&temp[0,5)",new BigDecimal("0.16"));
        jsonObject.put("soc(70,80]&temp[5,10)",new BigDecimal("0.21"));
        jsonObject.put("soc(70,80]&temp[10,15)",new BigDecimal("0.35"));
        jsonObject.put("soc(70,80]&temp[15,20)",new BigDecimal("0.40"));
        jsonObject.put("soc(70,80]&temp[20,25)",new BigDecimal("0.45"));
        jsonObject.put("soc(70,80]&temp[25,30)",new BigDecimal("0.80"));
        jsonObject.put("soc(70,80]&temp[30,35)",new BigDecimal("0.80"));
        jsonObject.put("soc(70,80]&temp[35,40)",new BigDecimal("0.80"));
        jsonObject.put("soc(70,80]&temp[40,45)",new BigDecimal("0.80"));
        jsonObject.put("soc(70,80]&temp[45,50)",new BigDecimal("0.60"));
        jsonObject.put("soc(70,80]&temp[50,55)",new BigDecimal("0.30"));
        jsonObject.put("soc(80,85]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(80,85]&temp[-20,-15)",new BigDecimal("0.02"));
        jsonObject.put("soc(80,85]&temp[-15,-10)",new BigDecimal("0.02"));
        jsonObject.put("soc(80,85]&temp[-10,-5)",new BigDecimal("0.04"));
        jsonObject.put("soc(80,85]&temp[-5,0)",new BigDecimal("0.08"));
        jsonObject.put("soc(80,85]&temp[0,5)",new BigDecimal("0.10"));
        jsonObject.put("soc(80,85]&temp[5,10)",new BigDecimal("0.13"));
        jsonObject.put("soc(80,85]&temp[10,15)",new BigDecimal("0.20"));
        jsonObject.put("soc(80,85]&temp[15,20)",new BigDecimal("0.28"));
        jsonObject.put("soc(80,85]&temp[20,25)",new BigDecimal("0.30"));
        jsonObject.put("soc(80,85]&temp[25,30)",new BigDecimal("0.50"));
        jsonObject.put("soc(80,85]&temp[30,35)",new BigDecimal("0.50"));
        jsonObject.put("soc(80,85]&temp[35,40)",new BigDecimal("0.50"));
        jsonObject.put("soc(80,85]&temp[40,45)",new BigDecimal("0.50"));
        jsonObject.put("soc(80,85]&temp[45,50)",new BigDecimal("0.40"));
        jsonObject.put("soc(80,85]&temp[50,55)",new BigDecimal("0.30"));
        jsonObject.put("soc(85,90]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(85,90]&temp[-20,-15)",new BigDecimal("0.02"));
        jsonObject.put("soc(85,90]&temp[-15,-10)",new BigDecimal("0.02"));
        jsonObject.put("soc(85,90]&temp[-10,-5)",new BigDecimal("0.04"));
        jsonObject.put("soc(85,90]&temp[-5,0)",new BigDecimal("0.05"));
        jsonObject.put("soc(85,90]&temp[0,5)",new BigDecimal("0.08"));
    }

    private void extracted2(JSONObject jsonObject) {
        jsonObject.put("soc(10,20]&temp[40,45)",new BigDecimal("1.20"));
        jsonObject.put("soc(10,20]&temp[45,50)",new BigDecimal("1.00"));
        jsonObject.put("soc(10,20]&temp[50,55)",new BigDecimal("0.50"));
        jsonObject.put("soc(20,30]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(20,30]&temp[-20,-15)",new BigDecimal("0.05"));
        jsonObject.put("soc(20,30]&temp[-15,-10)",new BigDecimal("0.10"));
        jsonObject.put("soc(20,30]&temp[-10,-5)",new BigDecimal("0.23"));
        jsonObject.put("soc(20,30]&temp[-5,0)",new BigDecimal("0.33"));
        jsonObject.put("soc(20,30]&temp[0,5)",new BigDecimal("0.37"));
        jsonObject.put("soc(20,30]&temp[5,10)",new BigDecimal("0.53"));
        jsonObject.put("soc(20,30]&temp[10,15)",new BigDecimal("0.64"));
        jsonObject.put("soc(20,30]&temp[15,20)",new BigDecimal("0.76"));
        jsonObject.put("soc(20,30]&temp[20,25)",new BigDecimal("0.80"));
        jsonObject.put("soc(20,30]&temp[25,30)",new BigDecimal("1.20"));
        jsonObject.put("soc(20,30]&temp[30,35)",new BigDecimal("1.20"));
        jsonObject.put("soc(20,30]&temp[35,40)",new BigDecimal("1.20"));
        jsonObject.put("soc(20,30]&temp[40,45)",new BigDecimal("1.20"));
        jsonObject.put("soc(20,30]&temp[45,50)",new BigDecimal("1.00"));
        jsonObject.put("soc(20,30]&temp[50,55)",new BigDecimal("0.40"));
        jsonObject.put("soc(30,40]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(30,40]&temp[-20,-15)",new BigDecimal("0.04"));
        jsonObject.put("soc(30,40]&temp[-15,-10)",new BigDecimal("0.10"));
        jsonObject.put("soc(30,40]&temp[-10,-5)",new BigDecimal("0.18"));
        jsonObject.put("soc(30,40]&temp[-5,0)",new BigDecimal("0.27"));
        jsonObject.put("soc(30,40]&temp[0,5)",new BigDecimal("0.33"));
        jsonObject.put("soc(30,40]&temp[5,10)",new BigDecimal("0.49"));
        jsonObject.put("soc(30,40]&temp[10,15)",new BigDecimal("0.64"));
        jsonObject.put("soc(30,40]&temp[15,20)",new BigDecimal("0.76"));
        jsonObject.put("soc(30,40]&temp[20,25)",new BigDecimal("0.80"));
        jsonObject.put("soc(30,40]&temp[25,30)",new BigDecimal("1.20"));
        jsonObject.put("soc(30,40]&temp[30,35)",new BigDecimal("1.20"));
        jsonObject.put("soc(30,40]&temp[35,40)",new BigDecimal("1.20"));
        jsonObject.put("soc(30,40]&temp[40,45)",new BigDecimal("1.20"));
        jsonObject.put("soc(30,40]&temp[45,50)",new BigDecimal("1.00"));
        jsonObject.put("soc(30,40]&temp[50,55)",new BigDecimal("0.40"));
        jsonObject.put("soc(40,50]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(40,50]&<temp[-20,-15)",new BigDecimal("0.04"));
        jsonObject.put("soc(40,50]&<temp[-15,-10)",new BigDecimal("0.10"));
        jsonObject.put("soc(40,50]&<temp[-10,-5)",new BigDecimal("0.18"));
        jsonObject.put("soc(40,50]&temp[-5,0)",new BigDecimal("0.23"));
        jsonObject.put("soc(40,50]&temp[0,5)",new BigDecimal("0.30"));
        jsonObject.put("soc(40,50]&temp[5,10)",new BigDecimal("0.45"));
        jsonObject.put("soc(40,50]&temp[10,15)",new BigDecimal("0.59"));
        jsonObject.put("soc(40,50]&temp[15,20)",new BigDecimal("0.70"));
        jsonObject.put("soc(40,50]&temp[20,25)",new BigDecimal("0.75"));
        jsonObject.put("soc(40,50]&temp[25,30)",new BigDecimal("1.05"));
        jsonObject.put("soc(40,50]&temp[30,35)",new BigDecimal("1.05"));
        jsonObject.put("soc(40,50]&temp[35,40)",new BigDecimal("1.05"));
        jsonObject.put("soc(40,50]&temp[40,45)",new BigDecimal("1.05"));
        jsonObject.put("soc(40,50]&temp[45,50)",new BigDecimal("0.80"));
        jsonObject.put("soc(40,50]&temp[50,55)",new BigDecimal("0.40"));
        jsonObject.put("soc(50,60]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(50,60]&<temp[-20,-15)",new BigDecimal("0.03"));
        jsonObject.put("soc(50,60]&<temp[-15,-10)",new BigDecimal("0.04"));
        jsonObject.put("soc(50,60]&<temp[-10,-5)",new BigDecimal("0.14"));
    }

    private void extracted1(JSONObject jsonObject) {
        jsonObject.put("soc(0,5]&temp[10,15)&vmin>>2.4",new BigDecimal("0.80"));
        jsonObject.put("soc(0,5]&temp[15,20)&vmin>>2.4",new BigDecimal("0.85"));
        jsonObject.put("soc(0,5]&temp[20,25)&vmin>>2.4",new BigDecimal("1.00"));
        jsonObject.put("soc(0,5]&temp[25,30)&vmin>>2.4",new BigDecimal("1.20"));
        jsonObject.put("soc(0,5]&temp[30,35)&vmin>>2.4",new BigDecimal("1.20"));
        jsonObject.put("soc(0,5]&temp[35,40)&vmin>>2.4",new BigDecimal("1.20"));
        jsonObject.put("soc(0,5]&temp[40,45)&vmin>>2.4",new BigDecimal("1.20"));
        jsonObject.put("soc(0,5]&temp[45,50)&vmin>>2.4",new BigDecimal("1.00"));
        jsonObject.put("soc(0,5]&temp[50,55)&vmin>>2.4",new BigDecimal("0.50"));
        jsonObject.put("soc(5,10]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(5,10]&temp[-20,-15)",new BigDecimal("0.10"));
        jsonObject.put("soc(5,10]&temp[-15,-10)",new BigDecimal("0.20"));
        jsonObject.put("soc(5,10]&temp[-10,-5)",new BigDecimal("0.23"));
        jsonObject.put("soc(5,10]&temp[-5,0)",new BigDecimal("0.33"));
        jsonObject.put("soc(5,10]&temp[0,5)",new BigDecimal("0.57"));
        jsonObject.put("soc(5,10]&temp[5,10)",new BigDecimal("0.74"));
        jsonObject.put("soc(5,10]&temp[10,15)",new BigDecimal("0.80"));
        jsonObject.put("soc(5,10]&temp[15,20)",new BigDecimal("0.85"));
        jsonObject.put("soc(5,10]&temp[20,25)",new BigDecimal("1.00"));
        jsonObject.put("soc(5,10]&temp[25,30)",new BigDecimal("1.20"));
        jsonObject.put("soc(5,10]&temp[30,35)",new BigDecimal("1.20"));
        jsonObject.put("soc(5,10]&temp[35,40)",new BigDecimal("1.20"));
        jsonObject.put("soc(5,10]&temp[40,45)",new BigDecimal("1.20"));
        jsonObject.put("soc(5,10]&temp[45,50)",new BigDecimal("1.00"));
        jsonObject.put("soc(5,10]&temp[50,55)",new BigDecimal("0.50"));
        jsonObject.put("soc(10,20]&temp<-20",new BigDecimal("0.00"));
        jsonObject.put("soc(10,20]&temp[-20,-15)",new BigDecimal("0.07"));
        jsonObject.put("soc(10,20]&<temp[-15,-10)",new BigDecimal("0.15"));
        jsonObject.put("soc(10,20]&<temp[-10,-5)",new BigDecimal("0.23"));
        jsonObject.put("soc(10,20]&temp[-5,0)",new BigDecimal("0.33"));
        jsonObject.put("soc(10,20]&temp[0,5)",new BigDecimal("0.50"));
        jsonObject.put("soc(10,20]&temp[5,10)",new BigDecimal("0.63"));
        jsonObject.put("soc(10,20]&temp[10,15)",new BigDecimal("0.80"));
        jsonObject.put("soc(10,20]&temp[15,20)",new BigDecimal("0.85"));
        jsonObject.put("soc(10,20]&temp[20,25)",new BigDecimal("1.00"));
        jsonObject.put("soc(10,20]&temp[25,30)",new BigDecimal("1.20"));
        jsonObject.put("soc(10,20]&temp[30,35)",new BigDecimal("1.20"));
        jsonObject.put("soc(10,20]&temp[35,40)",new BigDecimal("1.20"));
    }
}
